Apparatuses and methods for calculating row hammer refresh addresses in a semiconductor device

ABSTRACT

An example apparatus according to an aspect of the present disclosure includes an address scrambler circuit including a sub-wordline scrambler circuit configured to receive a first subset of bits of a row hammer hit address. The sub-wordline scrambler circuit is configured to perform a first set of logical operations on the first subset of bits to provide a second subset of bits, and to perform a second set of logical operations on the first subset of bits and the second subset of bits to provide a third subset of bits of an row hammer refresh address.

CROSS-REFERENCE TO RELATED APPLICATION (S)

This application is a continuation of U.S. patent application Ser. No. 15/876,566 filed on Jan. 22, 2018. This application is incorporated by reference herein in its entirety and for all purposes.

BACKGROUND

A dynamic random access memory (DRAM), which is a typical semiconductor memory device, stores information by charges accumulated in cell capacitors, and, therefore, the information is lost unless refresh operations are periodically carried out. In addition to normal memory cell retention characteristics, as the density of DRAM cells has increased, certain access patters may further reduce retention time, thereby leading to data becoming corrupted. Such a problem has been exposed in DRAM devices, by repeatedly accessing (i.e., hammering) a row of memory, commonly referred to as a row hammer A row hammer causes adjacent rows of memory become susceptible to accelerated loss of data, as compared with a normal access operation of the memory. Some conventional solutions have been implemented to detect a likely row hammer of a target row, and initiate a refresh of rows that are adjacent to the target row. Conventional solutions are complex and require extensive circuitry to implement.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing an overall configuration of a semiconductor device 100 in accordance with some embodiments of the disclosure.

FIG. 2 is a block diagram showing a configuration of a refresh address control circuit in accordance with some embodiments of the disclosure.

FIG. 3 is an exemplary timing diagram for describing the operations of the refresh address control circuit of FIG. 1 and the refresh address control circuit of FIG. 2.

FIGS. 4A-4C are block diagrams showing logical relationships between physical and logical addresses in accordance with an embodiment of the disclosure.

FIG. 5 is a circuit diagram showing a configuration of a sub-wordline (SWL) scrambler circuit of an address scrambler in accordance with some embodiments of the disclosure.

FIG. 6 is a circuit diagram showing a configuration of an address scrambler circuit in accordance with some embodiments of the disclosure.

FIG. 7 is a circuit diagram showing a configuration of a row hammer count circuit in accordance with some embodiments of the disclosure.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

Hereinafter, some embodiments of the present disclosure will be described in detail with reference to accompanying drawings.

FIG. 1 is a block diagram showing an overall configuration of a semiconductor device 100 in accordance with some embodiments of the present disclosure.

The semiconductor device 100 may be a synchronous DRAM (SDRAM) for some embodiments of the disclosure, for example, a Double Data Rate 3 (DDR3), a Double Data Rate 4 (DDR4), etc., type integrated on a single semiconductor chip and has a memory cell array 111. The memory cell array 111 is provided with a plurality of word lines WL and a plurality of bit lines BL and has a configuration in which memory cells MC are disposed at the intersection points thereof. Selection of the word lines WL is carried out by a row decoder 112, and selection of bit lines BL is carried out by a column decoder 113. The memory cell array 111, the row decoder 112, the column decoder 113, and a read/write amplifier 114 are divided into eight banks BANK0 to BANK7.

Moreover, the semiconductor device 100 is provided with address terminals 121, command terminals 122, clock terminals 123, data terminals 124, data mask terminals 125, and power supply terminals 126 and 127 as external terminals.

The address terminals 121 are the terminals to which address signals ADD are input from outside. The address signals ADD are supplied to an address output circuit 132 via an address input circuit 131. The address output circuit 132 supplies a row address XADD to the row decoder 112 and supplies a column address YADD to the column decoder 113. Moreover, the row address XADD is supplied also to a refresh address control circuit 140.

The command terminals 122 are the terminals to which command signals COM are input from outside. The command signals COM are supplied to a command decoder 134 via a command input circuit 133. The command decoder 134 is a circuit which generates various internal commands by decoding the command signals COM. Examples of the internal commands include active signals ACT, pre-charge signals Pre, read/write signals R/W, and refresh signals AREF.

The active signal ACT is a pulse signal which is activated when the command signal COM is indicating row access (active command) When the active signal ACT is activated, the row decoder 112 of a specified bank address is activated. As a result, the word line WL specified by the row address XADD is selected and activated. The pre-charge signal Pre is a pulse signal which is activated when the command signal COM is indicating pre-charge. When the pre-charge signal Pre is activated, the row decoder 112 of the specified bank address and the word line WL specified by the row address XADD controlled thereby are deactivated.

The read/write signal R/W is a pulse signal which is activated when the command signal COM is indicating column access (read command or write command) When the read/write signal R/W is activated, the column decoder 113 is activated. As a result, the bit line BL specified by the column address YADD is selected.

Therefore, if the active command and the read command are input and if the row address XADD and the column address YADD are input in synchronization with them, read data is read from the memory cell MC specified by the row address XADD and the column address YADD. The read data DQ is output from the data terminal 124 to outside via a sense amplifier SAMP, a transfer gate TG, the read/write amplifier 114, and an input/output circuit 115.

On the other hand, if the active command and the write command are input, if the row address XADD and the column address YADD are input in synchronization with them, and, then, if write data DQ is input to the data terminal 124, the write data DQ is supplied to the memory cell array 111 via the input/output circuit 115, the read/write amplifier 114, the transfer gate TG, and the sense amplifier SAMP and is written to the memory cell MC specified by the row address XADD and the column address YADD.

The refresh signal AREF is a pulse signal which is activated when the command signal COM is indicating an auto-refresh command. Also, when the command signal COM is indicating a self-refresh entry command, the refresh signal AREF is activated, is activated once immediately after command input, thereafter, is cyclically activated at desired internal timing, and a refresh state is continued. By a self-refresh exit command thereafter, the activation of the refresh signal AREF is stopped and returns to an IDLE state. The refresh signal AREF is supplied to the refresh address control circuit 140. The refresh address control circuit 140 supplies a refreshing row address RXADD to the row decoder 112, thereby activating the predetermined word line WL contained in the memory cell array 111, thereby refreshing the information of the corresponding memory cell MC. Other than the refresh signal AREF, the active signal ACT, the row address XADD, etc. are supplied to the refresh address control circuit 140. Details of the refresh address control circuit 140 will be described later.

External clock signals CK and /CK are input to the clock terminals 123. The external clock signals CK and the external clock signals /CK are mutually complementary signals, and both of them are supplied to the clock input circuit 135. The clock input circuit 135 generates internal clock signals ICLK based on the external clock signals CK and /CK. The internal clock signals ICLK are supplied to the command decoder 134, an internal clock generator 136, etc. The internal clock generator 36 generates internal clock signals LCLK, which control the operation timing of the input/output circuit 115.

The data mask terminals 125 are the terminals to which data mask signals DM are input. When the data mask signal DM is activated, overwrite of corresponding data is prohibited.

The power supply terminals 126 are the terminals to which power supply potentials VDD and VSS are supplied. The power supply potentials VDD and VSS supplied to the power supply terminals 126 are supplied to a voltage generator 37. The voltage generator 137 generates various internal potentials VPP, VOD, VARY, VPERI, etc. based on the power supply potentials VDD and VSS. The internal potential VPP is the potential mainly used in the row decoder 112, the internal potentials VOD and VARY are the potentials used in the sense amplifier SAMP in the memory cell array 111, and the internal potential VPERI is the potential used in many other circuit blocks.

The power supply terminals 127 are the terminals to which power supply potentials VDDQ and VSSQ are supplied. The power supply potentials VDDQ and VSSQ supplied to the power supply terminals 127 are supplied to the input/output circuit 115. The power supply potentials VDDQ and VSSQ are the same potentials as the power supply potentials VDD and VSS, respectively, which are supplied to the power supply terminals 126. However, the dedicated power supply potentials VDDQ and VSSQ are used for the input/output circuit 115 so that power supply noise generated by the input/output circuit 115 does not propagate to other circuit blocks.

FIG. 2 is a block diagram showing a configuration of a refresh address control circuit 200 in accordance with some embodiments of the disclosure. The refresh address control circuit 140 of FIG. 1 may implement the refresh address control circuit 200.

As shown in FIG. 2, the refresh address control circuit 200 is provided with a sampling signal generator 241, which generates a first sampling signal S1, and a shift register 242, which carries out shift operations synchronized with the first sampling signal S1.

The sampling signal generator 241 randomly extracts the active signal ACT or the pre-charge signal Pre, which is generated in response to an active command or a pre-charge command, and outputs the signal as a first sampling signal S1. Meanwhile, the random extraction is configured so that an optimum sampling rate with which the reliability of Row Hammer refresh is the highest is present depending on the appearance frequency of hammer addresses and the number of stages (depth) of the shift register 42 and that desired reliability is obtained. The sampling signal generator 241 can generate the first sampling signal S1 by: using a pseudo-random generator 411 and a counter circuit, which may be clocked by, for example, the active signal ACT.

Herein, it may be desirable to impart randomness and support all the appearance patterns of hammer addresses. The optimum sampling rate described above is merely a mean value. For example, a case that a hammer address periodically appears at a rate of one time per 50 active commands and that the depth of the shift register 242 provided in the refresh address control circuit 200 is 4 is taken into consideration. Herein, if the sampling rate of the first sampling signal S1 is 1 (if all the row addresses are to be retrieved into the shift register 242), the number of the retrieved addresses is extremely large, and, therefore, many match signals are generated (by randomly appearing row addresses) Hammer addresses are reliably retrieved into the shift register 242; however, since the window width for capturing row addresses is 4, the matching signal “match” is not enabled by hitting the hammer addresses. Even if the sampling rate is somewhat increased to 2 or 3, this situation is not changed. Meanwhile, if the sampling rate is largely increased to 25 (a fixed value), the window width for capturing row addresses is expanded to 100, and results in a situation in which the match signal may be enabled by hitting the hammer addresses. Also, since there is a relation that the appearance frequency of hammer addresses is exactly two times the sampling rate, the hit rate thereof may become extremely high probability as if synchronization with hammer address has occurred. However, since they have a periodic appearance pattern and a constant sampling rate, hit may never occur as if mis-synchronization has occurred. If the appearance pattern of hammer addresses is random (even with a constant sampling rate), probabilistically, hammer addresses may be hit, but not always. Therefore, it is important to carry out random sampling to enable capturing of the hammer addresses having various appearance patterns. Herein, furthermore, a case in which the sampling rate is 100, which is large, is taken into consideration. The window width for capturing row-address becomes 400, which is eight times the appearance frequency of hammer addresses. The hammer addresses can be captured by carrying out random sampling, and the capture probability thereof (hit rate) can be also increased by providing the shift register 42 like the refresh address control circuit (FIG. 2) of the present embodiment. However, if the sampling rate is excessively increased, the number of times per se of capturing the hammer addresses is reduced since the number of active commands which can be entered within a refresh cycle has an upper limit. This is disadvantageous to increase reliability. Reversely, if the sampling rate is too small, as described above, the number of times of capturing thereof increases; however, the capture probability (hit rate) decreases. Thus, the end reliability is determined by a product of “the hammer's hit rate” and “the number of times of capturing hammer address”, therefore, the sampling rate has an optimum value with which reliability is the highest according to the balance of them. In order to exert performance by the refresh address control circuit 200, the first sampling signal S1 is extremely important.

The shift register 242 has a configuration in which n-stages of flip-flop circuits FF #1 to FF # n, which latch the row addresses XADD, are in cascade connection. In other words, an output node of the flip-flop circuit of a former stage is connected to an input node of the flip-flop circuit of a later stage. The first sampling signal S1 is commonly input to clock nodes of the flip-flop circuits FF #1 to FF # n. As a result, when the first sampling signal S1 is activated, the current row address XADD is latched by the flip-flop circuit FF #1 of a first stage, and the row addresses XADD latched by the flip-flop circuits FF #1 to FF # n−1 are respectively shifted to the flip-flop circuits FF #2 to FF # n of next stages. The row address XADD latched by the flip-flop circuit FF # n, which is a last stage, is discarded in response to activation of the first sampling signal S1.

The row addresses XADD latched by the flip-flop circuits FF #1 to FF # n are supplied to first-side input nodes of corresponding comparator circuits XOR1 to XORn, respectively. The current row address XADD is supplied to second-side input nodes of the comparator circuits XOR1 to XORn. As a result, if the current row address XADD matches any of the row addresses XADD latched by the flip-flop circuits FF #1 to FF # n, the output of the comparator circuit XOR1 to XORn thereof is activated to a low level, and, therefore, the match signal Match output from a NAND gate circuit 243 is activated to a high level.

The match signal Match and the first sampling signal S1 are supplied to an AND gate circuit 244. Therefore, if both of the match signal Match and the first sampling signal S1 are activated to the high level, a second sampling signal S2 output from the AND gate circuit 244 is activated to the high level. More specifically, if the row address XADD supplied when the first sampling signal S1 is activated within past n-times matches the row address XADD supplied when the first sampling signal S1 is currently activated, the second sampling signal S2 is activated. In other words, the access to the word lines WL is intermittently monitored, and, if the access to the same word line WL is captured two times or more within a predetermined period of time, the second sampling signal S2 is activated.

The second sampling signal S2 is supplied to a latch circuit 245. The latch circuit 245 latches the current row address XADD in response to the second sampling signal S2 and outputs this to an address scrambler 246 as a row hammer hit address signal HITXADD1.

Therefore, the HITXADD1 address signal output from the latch circuit 245 can be considered to be the row address XADD of the word line WL having a high access frequency. As a matter of course, since the first sampling signal S1 is intermittently activated with respect to the active signal ACT, the row address XADD of the word line WL having a high access frequency is not always latched by the latch circuit 245. However, the higher the access frequency of the row address XADD of the word line WL, the higher the probability thereof of being latched by the latch circuit 245; therefore, the row address XADD of the word line WL which is accessed by an extremely high frequency that reduces the information retention characteristics of the memory cells MC connected to the adjacent word line WL is latched by the latch circuit 245 with an extremely high probability.

Based on the HITXADD1 address signal output from the latch circuit 245, the address scrambler 246 converts that to a row hammer refresh address signal HITXADD2 of the word line WL affected by the highly-frequent access. In other words, if the HITXADD1 address signal is an aggressor address, the HITXADD2 address signal is a victim address. In many cases, the HITXADD2 address signal, which is the victim address, is the address of the word line WL which is adjacent to the word line WL accessed by the HITXADD1 address signal, which is the aggressor address. In some examples, the HITXADD2 address signal may include two separate row addresses; one on each side of the HITXADD1 address signal. In some examples having two separate row addresses, both of the row addresses of the HITXADD2 address may each correspond to a respective word line WL that is directly adjacent (e.g., physically adjacent) to the word line WL accessed by the HITXADD1 address.

The refresh address control circuit 200 further contains a refresh counter 247 and a refresh cycle generator 248. The refresh counter 247 is a circuit which updates a row address Pre_RXADD when the refresh signal AREF is activated. The row address Pre_RXADD is the address of the word line corresponding to the memory cell MC to be refreshed in response to the refresh signal AREF. In some examples, if an INTERRUPT signal generated by the refresh cycle generator 248 is activated, update of the row address Pre_RXADD by the refresh counter 247 is prohibited even if the refresh signal AREF is activated. The INTERRUPT signal may indicate time in which a refresh for a row hammer is performed.

The refresh cycle generator 248 activates the INTERRUPT signal in response to a predetermined times of activation of the refresh signal AREF. For example, the refresh cycle generator 248 may include a counter that uses the refresh signal AREF as a clock synchronization signal to determine when to set the INTERRUPT signal.

The multiplexer 249 receives the HITXADD2 address signal output from the address scrambler 246 and the row address Pre_RXADD output from the refresh counter 247 and outputs either one of them to a row decoder (e.g., the row decoder 112 of FIG. 1) as the row address RXADD of a refresh target. The selection thereof is carried out by the INTERRUPT signal; wherein, if the INTERRUPT signal is deactivated, the row address Pre_RXADD output from the refresh counter 247 is selected; and, if the INTERRUPT signal is activated, the HITXADD2 address signal output from the address scrambler 246 is selected; thereby switching and carrying out a normal refresh and a Row Hammer refresh.

FIG. 3 is an exemplary timing diagram 300 for describing the operations of the refresh address control circuit 140 of FIG. 1 and the refresh address control circuit 200 of FIG. 2. The AREF, ACT, and RXADD signals correspond to the AREF, ACT, and RXADD signals of FIGS. 1 and 2. The S1, S2, HITXADD1, HITXADD2, and INTERRUPT signals correspond to the S1, S2, HITXADD1, HITXADD2, and INTERRUPT signals of FIG. 2. The flip-flop signal FF corresponds to address stored in the flip-flops of the shifter register 242 of FIG. 2.

In the timing diagram 300, the FF signal indicates that an address R0 was previously stored in the shift register 242, at time T1. Between times T1 and T2, the active signal ACT provides an access request for an address R1. Because the refresh address control circuit sampling is random, the address R1 is not captured and stored in the flip-flops (e.g., because the S1 signal is low). At time T2, a refresh command AREF requests a refresh of address Rk, and address Rk is provided as the refresh address on the RXADD signal.

At time T3, the active signal ACT provides an access request for an address R2. At time T4, in response to the S1 signal, the address R2 is captured and stored in the shift-register (FF signal), along with address R0. Because there was not an address R2 previously stored in the shift register, the S2 signal remains low. Between times T4 and T5, another refresh command AREF requests a refresh of address Rk+1, and address Rk+1 is provided as the refresh address on the RXADD signal.

At time T5, the active signal ACT provides an access request for an address R0. At time T6, in response to the S1 signal, the address R0 is captured and stored in the shift-register (FF signal). At time T7, in response to detecting a match between the address R0 received via the ACT signal and the address R0 previously stored in the shift register, the S2 signal transitions high, and the HITXADD1 signal is set to the address R0. The address scrambler 246 provides a first row hammer refresh address R0′ on the HITXADD2 signal. At time T8, the INTERRUPT signal switches high, and in response, the RXADD signal provides the first row hammer refresh address R0′ from the HITXADD2 signal as the address to be refreshed. Subsequently, at time T9, the address scrambler 246 provides a second row hammer refresh address R0″ on the HITXADD2 signal. At time T10, the INTERRUPT signal switches high, and in response, the RXADD signal provides the second row hammer refresh address R0″ to be refreshed from the HITXADD2 signal as the address to be refreshed.

In this manner, in the present embodiment, the access responding to the active signal ACT is intermittently monitored by using the first sampling signal S1; and, if occurrence of a predetermined times of access with respect to the same word line WL in a predetermined period of time is detected, the HITXADD1 address signal of the word line WL is latched by the latch circuit 245. The HITXADD1 address signal is converted to the HITXADD2 address signal by the address scrambler 246 and, in response to activation of the INTERRUPT signal, is supplied to the row decoder 112. As a result, the word line WL which is related to (mainly adjacent to) the word line WL′ having a high access frequency is activated. Therefore, the memory cell MC, which may have critically decreased data retention characteristics due to a row hammer effect, can be additionally refreshed.

FIGS. 4A-4C are a block diagrams showing logical relationships between physical and logical addresses in accordance with an embodiment of the disclosure. In FIG. 4A, the graphic 400 shows that, in a sub-word line scrambler, the last four bits of every address could be used to classify and process every address using either an odd sub word decoder or an even sub-word decoder. The graphic 400 depicts 16 hex values 0-E, with each hex value coupled to one of the odd sub word decoder or the even sub-word decoder.

Referring to FIG. 4B, table 401 depicts logical relationships between four least significant bits A3:A0 of a seed address (e.g., the HITXADD1 address) and the four least significant bits AO3:AO0 of the adjacent row hammer addresses (e.g., the HITXADD2 address) that would be refreshed when a row hammer is detected. An adjacent row hammer address RHR+1 is shown in the RHR address (+1) section. The XOR section includes the values of X3:X0 bits that could be bitwise XOR'd with the corresponding seed address bits A3:A0 to determine the RHR+1 address AO3:AO0 for both even and odd seed addresses. An adjacent row hammer address RHR−1 is shown in the RHR address (−1) section. The XOR section includes the values of X3:X0 bits that could be bitwise XOR'd with the corresponding seed address bits A3:A0 to determine the RHR−1 address AO3:AO0 for both even and odd seed addresses. As shown in the table 401, for even seed addresses, all of the XOR values X3:X0 410A used to generate the RHR+1 address 409A are all 0001b. Additionally, for odd seed addresses, all of the XOR values X3:X0 410B used to generate the RHR−1 address 409B are 0001b. Therefore, no matter whether the seed address is even or odd, a first RHR address could be calculated using common logic that XORs the seed address with a 0001b.

The XOR values X3:X0 411B for the even RHR−1 addresses differ from the XOR values X3:X0 411A for the odd RHR+1 addresses. However, referring to FIG. 4C, using the tables and formulas shown in 402A-D, the XOR values may be determined using the seed address A3:A0 values. For example, the XOR X0 bit may be set to 1, as is shown in 402A. The XOR X1 bit may be calculated using the formula bit shown in 402B, which is set high when one of a bitwise XOR between A0, A1, and A3 is true OR a bitwise XOR between A1 and A2 is true. Otherwise, the X1 bit is set low. The XOR X2 bit may be calculated using the formula bit shown in 402C, which is set high when a bitwise XOR between A0, A1, and A3 is false and a bitwise XOR between A1 and A2 is true. Otherwise, the X2 bit is set low. The XOR X3 bit may be calculated using the formula bit shown in 402D, which is set high when a bitwise XOR between A0, A1, and A3 is false and a bitwise XOR between A1 and A2 is false. Otherwise, the X3 bit is set low.

Because the RHR+1 and RHR−1 addresses are determined using a subset of bits of a full address, the resultant addresses may run into an issue at certain boundary values. For example, at a seed address 0000b (0 hex), the RHR−1 address cannot be further reduced by one without involving a next (e.g., fifth) bit. Similarly, the address 1001b (9 hex) results in a value of RHR+1 address value of 0000b. To account for these special cases, the carry bits C+ and C− may be set. The carry bits may be used by downstream circuitry to determine the correct address value. While FIGS. A-4C shows 4 least significant bits of an address, more or fewer bits may be used to determine the XOR values and the RHR+1 and RHR−1 addresses.

FIG. 5 is a circuit diagram showing a configuration of a sub-wordline (SWL) scrambler circuit 500 of an address scrambler in accordance with some embodiments of the disclosure. The address scrambler 246 of FIG. 2 may implement the SWL scrambler circuit 500. The portion of the address scrambler 500 receives a seed address A3:A0, calculates an inverted carry bit COUTF, the XOR bits X3:X1 (e.g., note that X0 is 1 in every example in the table 401 of FIG. 4B). Note that the address bits AF3:AF0 are the inverted seed address bits A3:A0, and X3F:X1F bits are the inverted X3:X1 bits.

As shown in FIG. 5, the SWL scrambler circuit 500 includes a carry bit circuit 510, an XOR bit circuit 520, and an address output circuit 530. The carry bit circuit 510 circuit is configured to calculate an inverted carry bit COUTF. The COUTF bit may correspond to the carry bits C+ and C− included in the table 401 of FIG. 4B. The carry bit circuit 510 includes an XOR logic gate 511, a NOR logic gate 512, an inverter 513, an inverter 514, and a NAND logic gate 515. The inverters 513 and 514 may drive a RHR second signal RHR2ND. The RHR2ND signal indicates whether a first RHR address (e.g., low logical values) or a second RHR address (e.g., high logical value) is being calculated. The XOR logic gate 511 performs a bitwise XOR operation on the inverted seed address bits A3 and A0. The NOR logic gate 512 performed a bitwise NOR operation on seed address bits A2 and A1. The NAND logic gate 515 performs a NAND operation on the output of the XOR logic gate 511, the NOR logic gate 512, and the RHR2ND signal (via the inverters 513 and 514).

The XOR bit circuit 520 includes a first logic circuit 540 configured to calculate the bitwise XOR operation on the seed address bits A3, A1, and A0 and a second logic circuit 542 configured to perform the bitwise XOR operation on the seed address bits A2 and A1, as used in the formulas shown in 402B, 402C, and 402D of FIG. 4C. The first logic circuit 540 includes an XOR logic gate 521 that performs a bitwise XOR operation on the seed address bits A3 and A0 to provide the AE03 signal and an XOR logic gate 525 that performs a bitwise XOR operation on the seed address bit A1 and the output AE03 signal of the 523 to provide to the AE013 signal. The first logic circuit 540 also includes inverter 523 that inverts the output AE03 signal of the XOR logic gate 521 to provide the AE03F signal. The second logic circuit 542 includes an XOR logic gate 522 that performs a bitwise XOR operation on the seed address bits A2 and A1 to provide the AE12 signal and an inverter 524 that inverts the output AE12 signal of the XOR logic gate 522 to provide the AE12F signal.

The XOR bit circuit 520 further includes NOR gates 550, 551, and 552 that are configured to perform NOR operations on combinations of the AE013 and AE12/AE12F signals. The NOR gate 550 is configured to perform a NOR operation on the AE013 signal and the AE12 signal. The NOR gate 551 is configured to perform a NOR operation on the AE013 signal and the AE12F signal. The NOR gate 552 is configured to perform a NOR operation on the AE013 signal and the AE12 signal.

The XOR bit circuit 520 further includes NOR gate 553 and NAND gates 554 and 555, which may pass through the outputs of the NOR gates 550, 551, and 552 when the RHR2ND signal indicates the second RHR address and block the outputs of the NOR gates 550, 551, and 552 when the RHR2ND signal indicates the first RHR address. The output of the NOR gate 553 provides the X1 signal and an inverted X1 signal X1F via the inverter 556. The output of the NAND gate 554 provides the X2 signal via the inverter 557. The output of the NAND gate 555 provides the X3 signal via the inverter 558.

The address output circuit 530 performs the XOR operation on the XOR bits X3:X0 and the seed address bits A3:A0 to provide the AO3:AO0 bits. The address output circuit 530 includes a 531 that inverts the A0 bit to provide the AO0 bit (e.g., logically equivalent to an XOR operation on X0 (which is equal to 1) and the A0 bit). The address output circuit 530 further includes XOR gates 532, 533, and 534 which bitwise XOR the A1 and X1, A2 and X2, and A3 and X3 bits, respectively, to provide the AO1, AO2, and AO3 bits, respectively.

The SWL scrambler circuit 500 is an exemplary implementation of an address scrambler, and other logic circuits could be implemented without departing from the scope of the disclosure.

FIG. 6 is a circuit diagram showing a configuration of an address scrambler circuit 600 in accordance with some embodiments of the disclosure. The address scrambler 246 of FIG. 2 may implement the address scrambler 600. The address scrambler 600 receives the HIT_XADD address A11:A0 and a RHR address HITXADD2 address AO11:AO0. The address scrambler 600 includes an SWL scrambler circuit 610 that provides the AO3:AO0 address bits and a series of row hammer count circuits 620(7)-620(1) that provide the AO11:AO4 address bits, respectively. The SWL scrambler circuit 610 may implement the SWL scrambler circuit 500 of FIG. 5 to provide the AO3:AO0 bits and the carry bit C based on the A3:A0 address bits.

The row hammer count circuits 620(8)-620(1) may each receive a respective address bit A11:A4; a carry out bit from a preceding one of the row hammer count circuits 620(6)-620(1), with the row hammer count circuit 620(1) receiving the carry bit C from the SWL scrambler circuit 610; and an inverted A0 bit (via the inverter 630) as a polarity bit used to indicate addition or subtraction. Each of the row hammer count circuits 620(8)-620(1) may calculated a respective one of the AO11:AO4 signals based on the received input signals.

For example, FIG. 7 is a circuit diagram showing a configuration of a row hammer count circuit 700 used to calculate an address output bit AOX based on an address bit AX, a carry out bit COUTX-1 from a previous RH counter or SWL scrambler circuit, and a polarity bit, where X is an integer from 4 to 11, in accordance with some embodiments of the disclosure. The row hammer count circuit 700 includes an XOR logic gate 713 configured to receive the address bit AX and the carry out COUTX-1 bit (and inverted AX bit via inverter 710 and inverted COUTX-1 bit via inverter 711) to provide the address output bit AOX using XOR logic. The row hammer count circuit 700 further includes an XOR logic gate 714 configured to receive the polarity bit and the carry out COUTX-1 bit (and inverted polarity bit via inverter 712 and inverted COUTX-1 bit via inverter 711) to provide an input to a NAND logic gate 715 using XOR logic. The NAND logic gate 715 may use NAND logic on the output of the XOR logic gate 714 and the inverted COUTX-1 bit to provide the COUTX bit. The table 701 depicts logical combinations of the AX, COUTX-1, and polarity bits, and resultant AOX and COUTX bits.

Turning back to FIG. 6, the output address bits AO11:AO0 may be provided to downstream circuitry as the RHRADD11:0 for refresh to mitigate effects from a row hammer attack. The logic circuits depicted in FIGS. 6 and 7 are exemplary and other logic circuits could be implemented without departing from the scope of the disclosure.

Although this disclosure has been disclosed in the context of certain preferred embodiments and examples, it will be understood by those skilled in the art that the disclosures extend beyond the specifically disclosed embodiments to other alternative embodiments and/or uses of the disclosures and obvious modifications and equivalents thereof. In addition, other modifications which are within the scope of this disclosure will be readily apparent to those of skill in the art based on this disclosure. It is also contemplated that various combination or sub-combination of the specific features and aspects of the embodiments may be made and still fall within the scope of the disclosures. It should be understood that various features and aspects of the disclosed embodiments can be combined with or substituted for one another in order to form varying mode of the disclosed disclosure. Thus, it is intended that the scope of at least some of the present disclosure herein disclosed should not be limited by the particular disclosed embodiments described above. 

What is claimed is:
 1. An apparatus comprising: a refresh address control circuit comprising: a shift register configured to store a plurality of previously-sampled row addresses corresponding to respective rows of memory cells and to receive a new sample row address corresponding to a first row of memory cells, wherein, in response to a sampling signal, the shift register is configured to provide an indication of a row hammer attack in response to detection of a match between the new sample row address and one of the plurality of previously-sampled row addresses; and an address scrambler circuit configured to receive the indication of the row hammer attack and the new sample row address, wherein the address scrambler circuit is further configured to perform first and second sets of logical operations on a first subset of bits of the new sample row address to provide a subset of bits of a victim row address corresponding to a second row of memory cells physically adjacent to the first row of memory cells.
 2. The apparatus of claim 1, wherein the address scrambler circuit is further configured to perform the first and second sets of logical operations on the first subset of bits of the new sample row address to provide a second subset of bits of a second victim row address corresponding to a third row of memory cells physically adjacent to the first row of memory cells.
 3. The apparatus of claim 1, wherein the address scrambler circuit is configured to perform bitwise exclusive OR operations as part of the first or second sets of logical operations.
 4. The apparatus of claim 1, wherein the address scrambler circuit is configured to perform the first set of logical operations performed by performing bitwise comparisons between a set of three bits of the first subset of bits and bitwise comparisons between a set of two bits of the first subset of bits.
 5. The apparatus of claim 4, wherein the set of three bits of the first subset of bits partially overlaps with the set of two bits of the first subset of bits.
 6. The apparatus of claim 1, wherein the address scrambler circuit is further configured to determine a remaining subset of bits of the victim row address based on a remaining subset of bits of the new sample row address.
 7. The apparatus of claim 6, wherein the address scrambler circuit is further configured to determine a carry bit based on the subset of bits of the new sample row address and is configured to determine the remaining subset of bits of the victim row address further based on the carry bit.
 8. The apparatus of claim 6, wherein the address scrambler circuit is further configured to determine a polarity bit based on a first bit of the subset of bits of the new sample row address and is configured to determine the remaining subset of bits of the victim row address further based on the polarity bit.
 9. The apparatus of claim 1, wherein the shift register comprises a plurality of sets of flip-flops each configured to store respective one of the plurality of previously-sampled row addresses.
 10. The apparatus of claim 9, wherein a first set of flip-flops of the plurality of sets of flip-flops is configured to store an output of a second set of flip-flops of the plurality of sets of flip-flops in response to the sampling signal.
 11. A method comprising: in response to a sampling signal, providing an indication of a row hammer attack in response to detection of a match between the new sample row address and one of a plurality of previously-sampled row addresses; and in response to the indication of the row hammer attack: performing first and second sets of logical operations on a first subset of bits of the new sample row address to provide a subset of bits of a victim row address corresponding to a second row of memory cells physically adjacent to the first row of memory cells
 12. The method of claim 11, further comprising performing the first and second sets of logical operations on the first subset of bits of the new sample row address to provide a second subset of bits of a second victim row address corresponding to a third row of memory cells physically adjacent to the first row of memory cells.
 13. The method of claim 11, further comprising performing bitwise exclusive OR operations as part of the first or second sets of logical operations.
 14. The method of claim 11, further comprising performing the first set of logical operations performed by performing bitwise comparisons between a set of three bits of the first subset of bits and bitwise comparisons between a set of two bits of the first subset of bits.
 15. The method of claim 14, wherein the set of three bits of the first subset of bits partially overlaps with the set of two bits of the first subset of bits.
 16. The method of claim 11, further comprising determining a remaining subset of bits of the victim row address based on a remaining subset of bits of the new sample row address.
 17. The method of claim 16, further comprising: determining a carry bit based on the subset of bits of the new sample row address; and determining the remaining subset of bits of the victim row address further based on the carry bit.
 18. The method of claim 16, further comprising: determining a polarity bit based on a first bit of the subset of bits of the new sample row address; and determining the remaining subset of bits of the victim row address further based on the polarity bit.
 19. The method of claim 11, further comprising storing each of the plurality of previously-sampled row addresses via respective set of a plurality of sets of flip-flops.
 20. The method of claim 11, wherein the first and second logical operations include common logical operations. 